An apparatus such as a video camera or the like for recording and reproducing a motion image has been researched and developed. Since a motion image is regarded as a set of still images which were time-sequentially reproduced, it is demanded that a motion image recording and reproducing apparatus time-sequentially records and reproduces a series of still image data.
As software for handling such a series of data (called “Movie”) which changes time-sequentially, for example, there are “QuickTime” (trademark), “Video for Windows” (trademark), and the like.
According to QuickTime, various data is managed along a time base. An application can handle multimedia data by using QuickTime independent of a data type, a data format, a compression format, and a hardware construction. The QuickTime itself has an easily-expandable structure and can cope with new data type, data format, compression format, and accelerator hardware. As mentioned above, since QuickTime does not depend on a platform, but corresponds to various recording formats, and has expandability, it is widely used. QuickTime has been disclosed in, for example, “INSIDE MACINTOSH: QuickTime (Japanese Edition) (Addison Wesley)” or the like. An outline of QuickTime will be described hereinbelow.
A fundamental data unit of a QuickTime movie resource is called “atom”. Each atom includes a size and type information together with the data.
FIG. 11 is a diagram showing an example of a QuickTime movie file.
The QuickTime movie file is constructed mainly by two portions, a movie atom 501 and a media data atom 502.
The movie atom 501 is a portion for storing information necessary for reproducing the file and information necessary for referring to real data. The media data atom 502 is a portion for storing the real data such as video, audio, or the like.
The movie atom includes a size, a type, a movie header atom, a movie clipping atom, a track list, and a user definition data atom. FIG. 11 shows a case where the movie atom 501 is constructed by a movie header atom 511 and two track atoms (a track (Video) atom 512 and a track (Audio) atom 513).
Information such as a time scale, a length, and the like regarding the whole movie is included in the movie header atom.
The track atom is prepared every kind of data and includes a size, a type, a track header atom, a track clipping atom, a tack matte atom, an edit atom, a media atom, and a user definition data atom. FIG. 11 shows a case where the movie atom is constructed by a track header atom 521 and a media atom 522.
In the track header atom, time information, space information, sound volume information, and the like are described and characteristics of tracks in the movie are specified.
In the media atom, data of the movie track is described. In the media atom, information for specifying components for interpreting the media data is also described and data information of the media is also specified. The media atom includes a size, a type, a media header atom, a media handler atom, a media information atom, and a user definition data atom. FIG. 11 shows a case where the media atom is constructed by a media header atom 531, a media handler atom 532, and a media information atom 533.
In the media header atom, information regarding the whole media is described and characteristics of the media as a storing location corresponding to the movie track are specified. The media handler atom designates components which should interpret data stored in the media. The media information atom stores information peculiar to a handler for the media data constructing the tracks. The media handler atom performs mapping from media time to the media data by using such information. FIG. 11 shows a case where the media information atom 533 is constructed by: a media information header atom 541; a data handler atom 542; a sample table 543; and a data information atom 544.
In the media information header atom, the information regarding the media is described. In the data handler atom, information regarding handling of the media data is described and information for designating a data handler component which provides means for accessing the media data is included. In the data information atom, information regarding the data is described. The sample table atom includes information necessary for converting the media time into a sample number indicative of a sampling position. FIG. 11 shows a case where the sample table atom 543 is constructed by: a sample description atom 551; a time-to-sample atom 552; a sample size atom 553; a sample-to-chunk atom 554; a chunk offset atom 555; and a sync sample atom 556.
Information necessary for decoding samples in the media is stored in the sample description atom. The media can have one or a plurality of sample description atoms in accordance with the kind of compression type which is used in this media. The sample chunk atom identifies a sample description corresponding to each sample in the media by referring to the table in the sample description atom.
In the time-to-sample atom, a relation between the sample and the time base, that is, a relation showing that the data of how many seconds has been recorded is described.
In the sample size atom, a size of sample is described.
In the sample to chunk atom, a relation between the sample and a chunk is described and the sampling position in the media is identified on the basis of information of a head chunk, the number of samples per chunk, and a sample description-ID.
In the chunk offset atom, a start bit position of the chunk in the movie data is described and a position of each chunk in a data stream is specified.
In the sync sample atom, information regarding a synchronization is described and a key frame in the media is designated. The key frame is a frame of a self intensional type which does not depend on a preceding frame.
In QuickTime, a minimum unit of the data is handled as a sample and the chunk is defined as a set of samples. From a viewpoint of improving accessing performance upon recording and reproduction, it is preferable that the samples in the chunk are continuously stored.
Since internal structures of the track (Video) atom 512 and track (audio) atom 513 are the same, they are omitted in FIG. 11.
In FIG. 11, for example, each of audio data encoded by a predetermined compression encoding system and image data encoded by a predetermined compression encoding system is stored into the movie data on a unit basis of a chunk comprising a predetermined number of samples. It is not always necessary to compression-encode the data but linear data can be also stored.
Each track in the movie atom and the data stored in the movie data have been made to correspond to each other.
In such a construction, QuickTime accesses the media data corresponding to specific time by giving a command to a proper media handler atom. For example, in case of searching samples, the search is executed by the following procedure.
First, the media handler atom determines the time based on a time scale of the relevant media.
Second, the media handler atom examines contents in the time-to-sample atom and determines the number of the sample in which the data corresponding to the designated time has been stored.
Third, the media handler atom examines contents in the sample chunk atom and determines the chunk in which the relevant samples have been stored.
Fourth, the media handler atom obtains an offset from the chunk offset atom to the chunk.
Fifth, an offset in the chunk is obtained from the sample size atom.
The media handler atom can identify the position and size of the sample corresponding to the given media time. QuickTime reproduces the real data in accordance with the time scale.
There is, however, a case where although the real data is recorded and reproduced onto/from a recording medium together with the management files which are time-sequentially handled, the management file is destroyed due to scratches formed on the recording medium, so that the data cannot be reproduced.